package com.sls.game.dao.nutsnet.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.sls.game.dao.impl.SuperDAO;
import com.sls.game.dao.nutsnet.NutsNetGoodsServerDAO;
import com.sls.game.pojo.nutsnet.NutsNetGoodsServerInfo;

/**
 * 
 * @description 坚果网络商品支持服务器DAO
 * @author Wangxuegang
 * @date 2012-11-1
 * 
 */
@Repository("nutsNetGoodsServerDAO")
public class NutsNetGoodsServerDAOImpl extends SuperDAO<NutsNetGoodsServerInfo>
		implements NutsNetGoodsServerDAO {

	/**
	 * 记录插入
	 * 
	 * @param nutsNetGoodsServerInfo
	 */
	@Override
	public void insert(NutsNetGoodsServerInfo nutsNetGoodsServerInfo) {
		this.getSqlSession().insert(
				"mybatis.xml.NutsNetGameServerMapper.insert",
				nutsNetGoodsServerInfo);
	}

	/**
	 * 记录查询
	 * 
	 * @param nutsNetGoodsServerInfo
	 * @return
	 */
	@Override
	public List<String> queryGameServer(NutsNetGoodsServerInfo nutsNetGoodsServerInfo) {
		List<String> hidGameSrvs = this.getSqlSession().selectList(
				"mybatis.xml.NutsNetGameServerMapper.queryGameServer",
				nutsNetGoodsServerInfo);
		return hidGameSrvs;
	}

	@Override
	public List<NutsNetGoodsServerInfo> queryOneOrMoreGameServer(
			NutsNetGoodsServerInfo nutsNetGoodsServerInfo) {
		List<NutsNetGoodsServerInfo> list = this.getSqlSession().selectList(
				"mybatis.xml.NutsNetGameServerMapper.queryOneOrMoreRecord",
				nutsNetGoodsServerInfo);
		return list;
	}

	/**
	 * 删除记录
	 * 
	 * @param id
	 */
	@Override
	public void deleteById(String id) {
		this.getSqlSession().delete(
				"mybatis.xml.NutsNetGameServerMapper.deleteById", id);
	}

}
